﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Common
{
    public class PagerModel
    {

        private string tblName;
        /// <summary>
        /// 要显示的表或多个表的连接
        /// </summary>
        public string TblName
        {
            get { return tblName; }
            set { tblName = value; }
        }

        private string fldName;
        /// <summary>
        /// 要显示的字段列表
        /// </summary>
        public string FldName
        {
            get { return fldName; }
            set { fldName = value; }
        }

        private string fldSort;
        /// <summary>
        /// 排序字段列表或条件,必须输入
        /// </summary>
        public string FldSort
        {
            get { return fldSort; }
            set { fldSort = value; }
        }

        string strCondition;
        /// <summary>
        /// 查询条件,不需where,必须输入
        /// </summary>
        public string StrCondition
        {
            get { return strCondition; }
            set { strCondition = value; }
        }

        int pageSize = 12;
        /// <summary>
        /// 每页显示的记录个数
        /// </summary>
        public int PageSize
        {
            get { return pageSize; }
            set { pageSize = value; }
        }

        int page = 1;
        /// <summary>
        /// 要显示那一页的记录
        /// </summary>
        public int Page
        {
            get { return page; }
            set { page = value; }
        }

        int curpage;
        /// <summary>
        /// 返回显示那一页的记录
        /// </summary>
        public int Curpage
        {
            get { return curpage; }
            set { curpage = value; }
        }

        int pageCount;
        /// <summary>
        /// 查询结果分页后的总页数
        /// </summary>
        public int PageCount
        {
            get { return pageCount; }
            set { pageCount = value; }
        }

        int counts;
        /// <summary>
        /// 查询到的记录数
        /// </summary>
        public int Counts
        {
            get { return counts; }
            set { counts = value; }
        }

        int retval;
        /// <summary>
        /// 返回状态
        /// </summary>  
        public int Retval
        {
            get { return retval; }
            set { retval = value; }
        }
    }
}
